﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Workflows.Components.TextMining.Clustering
{
    /// <summary>
    /// 
    /// </summary>
    public class TermPerformance : IComparable
    {
        #region props
        private int _TermID;
        /// <summary></summary>
        public int TermID
        {
            get
            {
                return this._TermID;
            }
            set
            {
                this._TermID = value;
            }
        }

        private string _Phrase;
        /// <summary></summary>
        public string Phrase
        {
            get
            {
                return this._Phrase;
            }
            set
            {
                this._Phrase = value;
            }
        }

        private double _ClassifierScore;
        /// <summary></summary>
        public double ClassifierScore
        {
            get
            {
                return this._ClassifierScore;
            }
            set
            {
                this._ClassifierScore = value;
            }
        }

        private double _Tfidf;
        /// <summary></summary>
        public double Tfidf
        {
            get
            {
                return this._Tfidf;
            }
            set
            {
                this._Tfidf = value;
            }
        }

        private int _DocSupport;
        /// <summary></summary>
        public int DocSupport
        {
            get
            {
                return this._DocSupport;
            }
            set
            {
                this._DocSupport = value;
            }
        }

        private int _ClusterSupport;
        /// <summary></summary>
        public int ClusterSupport
        {
            get
            {
                return this._ClusterSupport;
            }
            set
            {
                this._ClusterSupport = value;
            }
        }
        #endregion

        #region IComparable Members
        /// <summary>
        /// descending order
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int CompareTo(object obj)
        {
            if (obj.GetType() == typeof(TermPerformance))
            {
                TermPerformance otherTermPerformance = (TermPerformance)obj;
                return otherTermPerformance.ClassifierScore.CompareTo(this.ClassifierScore);
            }
            else
            {
                return 0;
            }
        }

        #endregion
    }
}
